Skip to content

feat(providers): add Claude Sonnet 5 model#5291

Merged
waleedlatif1 merged 3 commits into
stagingfrom
worktree-add-model-sonnet-5
Jun 30, 2026
Merged

feat(providers): add Claude Sonnet 5 model#5291
waleedlatif1 merged 3 commits into
stagingfrom
worktree-add-model-sonnet-5

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Add claude-sonnet-5 as the new flagship Anthropic Sonnet — 1M context, 128k max output, adaptive thinking with low/medium/high/xhigh/max effort (default high), native structured outputs
  • Apply introductory pricing ($2/$10 per MTok, $0.20 cached input) in effect through Aug 31 2026
  • Promote to recommended and set as the Anthropic defaultModel; demote claude-sonnet-4-6
  • Route claude-sonnet-5 through adaptive thinking in anthropic/core.ts — manual budget_tokens returns a 400 on Sonnet 5

Type of Change

  • New feature

Testing

  • bun run lint clean
  • tsc --noEmit clean for touched files
  • 155 provider tests pass (providers/utils.test.ts, providers/models.test.ts)
  • All values verified against live Anthropic docs (models overview, pricing, effort)

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

- Add claude-sonnet-5 (1M context, 128k output, adaptive thinking with low/medium/high/xhigh/max effort) as the new flagship Anthropic Sonnet
- Use introductory pricing ($2/$10 per MTok, $0.20 cached) in effect through Aug 31 2026
- Promote to recommended and set as Anthropic defaultModel; demote claude-sonnet-4-6
- Route claude-sonnet-5 through adaptive thinking in anthropic/core.ts (manual budget_tokens returns a 400)
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jun 30, 2026 6:49pm

Request Review

@cursor

cursor Bot commented Jun 30, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes default LLM for new workflows and Anthropic API thinking configuration; misconfiguration could cause 400s on Sonnet 5 or unexpected billing from the new default model.

Overview
Adds claude-sonnet-5 to the Anthropic catalog (1M context, 128k output, adaptive thinking levels including xhigh/max, introductory pricing) and makes it the recommended Anthropic model while removing that flag from claude-sonnet-4-6.

Default model for new LLM blocks, the model combobox fallback, executor constants (AGENT, ROUTER, EVALUATOR), agent tool resolution, and Pi handler is switched from claude-sonnet-4-6 to claude-sonnet-5. Copilot validation error hints and related unit tests are updated to match.

Anthropic provider routing treats Sonnet 5 like Opus 4.7/4.8: adaptive thinking onlysupportsAdaptiveThinking now includes sonnet-5, since manual budget_tokens fails on that model.

Reviewed by Cursor Bugbot for commit 09f9e13. Configure here.

@greptile-apps

greptile-apps Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds Claude Sonnet 5 as the new Anthropic flagship model. The main changes are:

  • New Sonnet 5 model metadata, pricing, capabilities, and default selection.
  • Updated block and executor defaults from Sonnet 4.6 to Sonnet 5.
  • Adaptive-thinking routing for Sonnet 5 in the Anthropic provider.
  • Updated tests for the new default model.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The Sonnet 5 temperature capability is present.
  • Temperature stays in the Anthropic payload unless thinking is explicitly enabled.

Important Files Changed

Filename Overview
apps/sim/providers/models.ts Adds Sonnet 5 metadata and makes it the Anthropic default model.
apps/sim/providers/anthropic/core.ts Routes Sonnet 5 through adaptive thinking when a thinking level is provided.
apps/sim/executor/constants.ts Updates executor default model constants to Sonnet 5.
apps/sim/blocks/blocks/agent.ts Updates the agent block model default and fallback to Sonnet 5.
apps/sim/blocks/blocks/router.ts Updates router block model defaults to Sonnet 5.
apps/sim/blocks/blocks/evaluator.ts Updates the evaluator block model default to Sonnet 5.
apps/sim/blocks/blocks/pi.ts Updates the Pi block model default to Sonnet 5.
apps/sim/executor/handlers/pi/pi-handler.ts Updates the Pi handler fallback model to Sonnet 5.

Reviews (3): Last reviewed commit: "feat(blocks): default agent-family block..." | Re-trigger Greptile

Comment thread apps/sim/providers/models.ts
Sonnet 5 accepts the temperature parameter (0-1, per Anthropic API docs), and it replaces claude-sonnet-4-6 as the default/recommended Anthropic model. Omitting the capability silently dropped temperature control for workflows on the default model. The request builder already strips temperature whenever thinking is active, so this only takes effect when thinking is disabled — where temperature is valid.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit c712c01. Configure here.

Propagate the Sonnet 5 flagship promotion to the block/executor/UI defaults so the default model is consistent everywhere:
- agent/router/evaluator/pi block defaultValue + agent runtime fallback
- executor AGENT/ROUTER/EVALUATOR DEFAULT_MODEL constants + pi-handler DEFAULT_MODEL
- combobox model-field default fallback
- update coupled tests (blocks, router/evaluator handlers, copilot model-suggestion validation) to the new default/recommended set

Stagehand's anthropic model pin is left on claude-sonnet-4-6 (separate tool-internal choice, not a block default).
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 09f9e13. Configure here.

@waleedlatif1 waleedlatif1 merged commit 8bf1989 into staging Jun 30, 2026
11 checks passed
@waleedlatif1 waleedlatif1 deleted the worktree-add-model-sonnet-5 branch June 30, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant